﻿using Baik.Interface.Execution;
using Baik.Interface.Expression;
using Baik.Interface.Framework;
using IFalse = Baik.Interface.Expression.IFalse;
using ITrue = Baik.Interface.Expression.ITrue;
using IUndefined = Baik.Interface.Expression.IUndefined;

namespace Baik.Expression
{
    public class ExpressionRegistrationScript : IRegistrationScript
    {
        public void Register(IInjector injector)
        {
            injector.Register<IExpressionParser>().AsSingletonOf<ExpressionParser>();
            injector.Register<IStringLiteral>().As<StringLiteral>();
            injector.Register<INumberLiteral>().As<NumberLiteral>();
            injector.Register<IObjectLiteral>().As<ObjectLiteral>();
            injector.Register<IFunctionLiteral>().As<FunctionLiteral>();
            injector.Register<IArrayLiteral>().As<ArrayLiteral>();
            injector.Register<IReference>().As<Reference>();
            injector.Register<ICall>().As<Call>();
            injector.Register<IUndefined>().As<UndefinedLiteral>();
            injector.Register<ITrue>().As <TrueLiteral>();
            injector.Register<IFalse>().As<FalseLiteral>();
            injector.Register<IReturn>().As<ReturnExpression>();
            injector.Register<IAssigment>().As<Assignment>();
            injector.Register<IArrayReference>().As<ArrayReference>();
        }
    }
}
